Quickbook API
Dev guides
- Building the locations array
- Pre-Booking vs ASAP
- Date Time Handling
- Passenger and courier service types
- Multi-account
Building the locations array
locations
can either be an āAddressā or an āAirportā as specified by the āsourceā field. Either way, they always need to contain lat/long coordinates in addition to the address information.
1. Address
"locations": [
{
"source": "Address",
"street_address": "Barbican Centre, 10 Silk St",
"town": "London",
"postcode": "EC2Y 8DS",
"country": "GB",
"lat": 51.520024,
"long": -0.092447,
"notes": "Wait before the car park and taxis entrance",
"contact": {
"name": "John Doe",
"mobile": "07123456789",
"email": "john.doe@example.com"
}
},
...
]
street_address
is used for all the part of the address that isnāt theTown
,Postcode
, orCountry
- The full address will be built from these parts as follows:
street_address
+town
+postcode
+ country- So the above example will become: Barbican Centre, 10 Silk St, London, EC2Y 8DS, GB
Parameters | Description | Required? |
---|---|---|
locations.street_address | Any part of the address thatās not town, postcode or country, for example: place name, building number and street name | Yes |
locations.town | Town/city name | Yes |
locations.postcode | Postal code/zip code | Yes |
locations.country | Country code ISO 3166-1 alpha-2 | Yes |
locations.lat | Latitude | Yes |
locations.long | Longitude | Yes |
locations.source | Address | Yes |
locations.notes | Location notes to be used by the driver | No |
locations.contact | The contact responsible for receiving the parcel. Courier booking only. | No |
locations.contact.name | Contact name | Yes |
locations.contact.mobile | Mobile phone number | Yes |
locations.contact.email | Email address | Yes |
2. Airport
{
"source": "Airport",
"street_address": "London Heathrow Airport",
"lat": 51.47138888,
"long": -0.45277777,
"airport": {
"iata": "LHR",
"terminal": "2",
"flight_number": "BA714"
"arrival_from": "LAX"
}
}
- Use
Airport
as the value for thesource
element - Use this for airport locations
- When doing pre-book airport pickups, this information should be used in conjunction with a flight number
Parameters | Description | Required? |
---|---|---|
locations.street_address | Human-readable name for airport | Yes |
locations.lat | Latitude | Yes |
locations.long | Longitude | Yes |
locations.source | Airport | Yes |
locations.airport.iata | Airport IATA code | Yes |
locations.airport.terminal | Airport terminal | No (2) |
locations.airport.flight_number | Flight number | No (1) |
locations.aiport.arrival_from | City flight is arriving from | No (3) |
locations.notes | Location notes to be used by the driver | No |
(1) flight_number
: while not mandatory, it is highly recommended that you provide it if possible, as it allows our systems to get terminal/arrival_from informational automatically, plus allows us to track flights and adjust pickup times accordingly.
(2) terminal
: while technically an optional field, it should be considered mandatory for airports with multiple terminals. (or as noted above, you can provide the flight number and we can look up the terminal information)
(3) arrival_from
: some terminals have very different collection points depending on whether the flight is international or domestic, so knowing where the flight is coming from is very useful. (or even better, as noted above, just provide the flight number, and we can look up the details for you).
Legacy Addresses
In the past instead of street_address
, a combination of address
and name
was used to form street addresses. This led to much confusion as the address
field was discarded, and name
required the full street address, not just a building name: which resulting in many malformed addresses missing important information.
Support for the legacy format is retained for partners already using it, but all new integrations should use the new format, and we advise existing partners to move to the new format to improve your code maintainability.
Pre-Booking vs ASAP
Generally, it's clear that if you want to make a booking for next week, you use a pre-book (providing pickupdt in the price quote/booking), and if you want the pickup as soon as possible, it's an ASAP (where you don't provide pickup_dt
in the price quote/booking.
Things are more complicated when you want to make a pre-booking for a time shortly in the future, say in an hour's time. The strict rule here is that you can only make pre-bookings for beyond the earliest ASAP pickup, which you determine using /quote/time/
.
If you try to make a pre-book for an earlier time than the earliest available pre-book, the booking will automatically be converted into an ASAP booking.
Date Time Handling
Date and time should be posted using the following ISO-8601 format.
YYYY-MM-DDThh:mm:ss:+hh:mm
Example: 2016-06-06T12:00:00+01:
Example: 2016-06-06T12:00:00+01:00
Date and time should be posted in LOCAL time.
You can post either with or without determinate the offset.
Dates and times will NOT be converted to timezones and offsets are currently not validated.
Passenger and courier service types
Depending on the commercial contract you have with us, some services will not be available on your account(s).
For passenger bookings, the available services are:
Service | Description | Passengers | Luggage | Code |
---|---|---|---|---|
Select | Everyday choice and comfort - professional driver and medium car for up to 4 people | 4 | 2 | standard_car |
Select+ | Everyday choice and comfort - professional driver and MPV/people carrier for up to 5 people | 5 | 2 | large_car |
Executive | Executive chauffeur and Mercedes E-Class or similar for up to 3 people | 3 | 2 | exec_car |
Local Partner | Everyday choice and comfort - professional driver and medium car for up to 4 people | 4 | 2 | local_partner |
Local Partner+ | Everyday choice and comfort - professional driver and MPV/people carrier for up to 5 people | 5 | 2 | local_partner_plus |
For courier bookings, example services are:
Service | Description | Size | Weight | Code |
---|---|---|---|---|
Push Bike | People powered delivery for small items | A4 Envelope | Up to 3 Kg | bicycle_courier |
Bike Delivery | Cuts through city traffic | A4 Box | Up to 5 kg | motorcycle_courier |
Parcel | For items that will fit in a car boot | Large Suitcase | Up to 20 kg | parcel_car |
Small Van | Ideal for big and bulky items | 1.7m x 1.5m x 1.2m | Up to 700 kg | small_van |
Transit Van | Perfect for moving large items | 2.5m x 1.7m x 1.4m | Up to 800 kg | large_van |
Direct Bike Delivery | Cuts through city traffic | A4 Box | Up to 5 kg | direct_motorcycle_courier |
Direct Transit Van | Perfect for moving large items | 2.5m x 1.7m x 1.4m | Up to 800 kg | direct_large_van |
Multi-account
Some partners can have more than one account which means one main account and multiple linked-accounts (multi-account).
To create a booking using the multi-account option:
- The
Authorization
header (AL client_id:client_secret
) should belong to the main account - The
payment_method
should beMultiAccount
- The
account.number
should contain the number of the account to be booked on
{
"payment_method" : "MultiAccount",
"account" : {
"number" : "123456"
},
"locations" : [{
"address" : "35-37 William Road",
...
}